<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/3/23
 * Time: 18:18
 */
namespace app\index\validate;
use think\Validate;

class PeijianValidate extends  Validate
{
    protected $rule = [
        'peijian'   => 'require',
        'price'     => 'require|number',
        'mun'       => 'require|number',
        'chengben' => 'require|number',
    ];

    protected $message = [
        'peijian.require'    => '请填写配件名称',
        'price.require'      => '请填写配件价格',
        'price.number'       => '请填写配件必须是数字',
        'mun.require'        => '请填写配件数量',
        'mun.number'         => '请填写配件必须是数字',
        'chengben.require'  => '请填写配件成本',
        'chengben.number'   => '请填写配件成本必须是数字',
    ];

}